﻿
using OABLL;
using OAModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MyOA
{
   
    public partial class GongZiYiWen : Form
    {

        GongziyihuoBLL bll = new GongziyihuoBLL();
        public string _yuangongid = string.Empty;

        public GongZiYiWen(string oa)
        {
            InitializeComponent();
            _yuangongid = oa;
        }

        private void GongZiYiWen_Load(object sender, EventArgs e)
        {
            OAUseEntity user = new OAUseBLL().Getyuangong(_yuangongid);
            this.label3.Text = _yuangongid;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            GongziYihuoEntity user = new GongziYihuoEntity();
           
            

        }



        //点击确定
        private void button1_Click_1(object sender, EventArgs e)
        {
            GongziYihuoEntity yh = new GongziYihuoEntity();

            yh.Oa问题=txt问题.Text.Trim();
            yh.Oa员工id = label3.Text;

            bool b1 = bll.Addsq(yh);
            if (b1 == true)
            {
                MessageBox.Show("提交申请成功，等待审批中！");


            }
            else
            {
                MessageBox.Show("提交失败，请稍后重试！");
            }
            this.Close();
        }

    }
    }

